Java HashMap remove() method removes the mapping from the hashmap